#region

using System;
using System.ComponentModel.DataAnnotations.Schema;

#endregion

namespace CuongHanh.Models
{
    [Table("tbl_MyStone")]
    public class MyStone : BaseClass
    {
        public string Name { get; set; }

        public string Code { get; set; }

        public string Image { get; set; }

        #region function

        public MyStone()
        {
        }

        public MyStone(MyStone model)
        {
            Name = model.Name;
            Code = model.Code;
            Image = model.Image;
            Inactive = false;
            LastModified = DateTime.Now;
        }

        public void UpdateInfo(MyStone model)
        {
            Name = model.Name;
            Code = model.Code;
            if(!string.IsNullOrWhiteSpace(model.Image))
                Image = model.Image;
            Inactive = false;
            LastModified = DateTime.Now;
        }

        #endregion
    }
}
